<?php
$login = Request::param('login');
if (DataSource::check_login($login)) {
    throw new XMLException(0, 'used');
}
else {
    throw new XMLException(1, 'free');
}
?>